/**
 * Free software.
 */

package org.nanhill.moo.domain.search.favor;

import org.nanhill.commons.pattern.search.SearchConstant;
import org.nanhill.commons.pattern.search.SearchException;

/**
 * @author alin [xalinx at gmail dot com]
 * @date 2006-11-17
 */
public class FavorIdDescCriterion extends FavorCriterion {

	private static final boolean order = SearchConstant.DESC;

	private static final FavorIdDescCriterion single = new FavorIdDescCriterion();

	public static FavorIdDescCriterion getSingle() {
		return single;
	}

	private FavorIdDescCriterion() {
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.nanhill.moo.domain.search.favor.FavorCriterion#accept(org.nanhill.moo.domain.search.favor.FavorVisitor)
	 */
	@Override
	protected void accept(FavorVisitor visitor) throws SearchException {
		visitor.visitIdOrder(this);

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.nanhill.commons.pattern.search.SearchCriterion#getDisplay()
	 */
	public String getDisplay() {
		return "Favor id order";
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.nanhill.commons.pattern.search.SearchCriterion#getValue()
	 */
	public Boolean getValue() {
		return order;
	}

}
